1. Field of the Invention
The present invention relates to an image processing apparatus, and particularly to an image processing apparatus in which image data that is obtained by photoelectric reading of an original image is subjected to predetermined image processing so that image data for output is obtained.
2. Description of the Related Art
There has recently been known technique in which a frame image recorded on a photographic film is read photoelectrically by a reading sensor such as a CCD, and digital image data obtained by the reading is subjected to image processing such as enlargement/reduction and various corrections, so that an image is formed on a recording medium by laser light modulated in accordance with the digital image data to which image processing has been effected.
In such technique of reading a frame image digitally by a reading sensor such as a CCD, in order to realize highly accurate reading of an image, a reading condition corresponding to density and the like of the frame image (for example, an amount of light irradiated on the frame image, time of charge accumulated in the CCD, and the like) is determined by preliminary reading of the frame image (so-called pre-scan), and the frame image is read again under the determined reading condition (so-called fine scan).
At this point, original image data (fine scan data) obtained by executing fine scan may be subjected to image processing so that a soft-focus image is formed.
In this case, high-frequency components and medium-frequency components are first eliminated with the use of a filter from original image data that is obtained by executing fine scan, thereby extracting original image data consisting only of low-frequency components so as to generate soft-finished image data. In other words, soft-finished image data that represents a soft-finished image, in which sharpness of an original image is reduced, is generated. Subsequently, reproducing image data that is used for reproducing an image is generated by combining soft-finished image data with original image data (fine scan data). By reproducing the image on the basis of the reproducing image data that is thus generated, a soft-focus image can be formed (see Japanese Patent Application Laid-Open (JP-A) No. 9-172600).
However, when image data for output is generated by combining soft-finished image data with original image data so as to form a soft-focus image, as mentioned above, an adding ratio for the time when soft-finished image data and original image data are combined with each other (a ratio of weight of soft-finished image data to original image data when they are combined with each other) as well as a degree of soft-finish of a soft-finished image, in which sharpness of an original image represented by original image data is reduced, are fixed.
Accordingly, a problem exists in that soft-focus intensity of a soft-focus image, which is reproduced in accordance with reproducing image data that is generated by combining soft-finished image data with original image data, is fixed and can not be changed.
The present invention has been devised to solve the above-described drawbacks and an object thereof is to provide an image processing apparatus in which soft-focus intensity can be changed when a soft-focus image is formed.
In order to achieve the above-described object, there is provided an image processing apparatus of a first aspect of the present invention, comprising: soft-finished image data generating means for generating soft-finished image data representing a soft-finished image in which sharpness of an original image represented by the original image data is reduced, on the basis of original image data; adding ratio setting means for setting an adding ratio for the time when the soft-finished image data that is generated by the soft-finished image data generating means and the original image data are combined with each other; and image data combining means for, on the basis of the adding ratio set by the adding ratio setting means, combining the soft-finished image data with the original image data so as to generate image data for output.
The image processing apparatus according to the first aspect of the present invention includes the soft-finished image data generating means for generating soft-finished image data representing a soft-finished image, in which sharpness of an original image represented by original image data is reduced. The soft-finished image data generating means can generate soft-finished image data, for example, by eliminating, via a filter, high-frequency components and medium-frequency components, which constitute original image data, so as to extract low-frequency components.
Further, the image processing apparatus includes the adding ratio setting means for setting an adding ratio for the time when soft-finished image data and original image data are combined with each other. The adding ratio is a ratio of weight of soft-finished image data to that of original image data when they are combined with each other. The adding ratio setting means can set the adding ratio, for example, by effecting calculating processing on the basis of soft-finished image data and original image data in such a manner that soft-focus intensity of a soft-focus image to be formed becomes a desired value.
Moreover, the image processing apparatus includes the image data combining means for combining soft-finished image data with original image data on the basis of the adding ratio set by the adding ratio setting means, so to generate image data for output. A soft-focus image can be formed by outputting an image through the use of the image data for output generated by the image data combining means. The soft-focus intensity of the soft-focus image is taken into consideration in advance when the adding ratio, for the time when soft-finished image data and original image data are combined with each other, is set. In other words, the adding ratio is set in accordance with the desired soft-focus intensity. For example, if higher soft-focus intensity is required, it can be realized by setting the adding ratio of soft-finished image data high when combining soft-finished image data with original image data. On the other hand, if lower soft-focus intensity is required, it can be realized by setting the adding ratio of soft-finished image data low.
Accordingly, since the adding ratio for the time when soft-finished image data and original image data are combined with each other can be set in accordance with desired soft-focus intensity, soft-focus intensity of a soft-focus image can be changed.
An image processing apparatus according to a second aspect of the present invention further comprises soft-finish-degree changing means for changing a degree of soft-finish of the soft-finished image data generated by the soft-finished image data generating means.
According to the invention of the second aspect, since a degree of soft-finish can be changed for the soft-finished image data alone, which combines the original image data, the same adding ratio can produce varied degrees of soft-finish. Thus, a wider variety of soft-finished image can be obtained.
According to a third aspect of the present invention, the image processing apparatus of the first or second aspect further comprises: face region extracting means for, on the basis of the original image data, extracting a region which corresponds to a face of a person in the original image; and determining means for determining the size of the region which corresponds to the face and which is extracted by the face region extracting means, wherein, on the basis of the size of the region corresponding to the face which size is determined by the determining means, the adding ratio setting means sets the adding ratio for the time when the soft-finished image data and the original image data are combined with each other.
A face of a person in an original image may not be discerned when a region that corresponds to the face of the person is small but a soft-focus image is nevertheless formed with soft-focus intensity being set high. Accordingly, the image processing apparatus according to the third aspect of the present invention includes not only the soft-finished image data generation means, the adding ratio setting means and the image data combining means, but also the face region extracting means for extracting a region that corresponds to a face of a person in the original image and the determining means for determining the size of the extracted region that corresponds to the face. The face region extracting means can, for example, convert original image data into hue and color saturation values for each pixel so that the region corresponding to the face of the person can be extracted on the basis of the distribution information thereof. Further, the determining means can determine the size of the region that corresponds to the face by, for example, counting the number of pixels in the extracted region that corresponds to the face.
The adding ratio setting means provided to the image processing apparatus with the above configuration sets the adding ratio on the basis of the size of the extracted region that corresponds to the face. In other words, when the region that corresponds to the face in the original image is small, the adding ratio is set in such a manner that the soft-focus intensity is made lower. Thus, when the region that corresponds to the face of the person in the original image is small, the soft-focus intensity for the time when the soft-focus image is formed is restricted. Accordingly, it is possible to discern the person reliably in the soft-focus image that has been formed.
According to a fourth aspect of the present invention, the image processing apparatus of any one aspect of the first through third aspects further comprises: outputting means for outputting an image based on image data for output that is generated by the image data combining means; and adding ratio inputting means for inputting correction instructing information that gives an instruction to correct the adding ratio set by the adding ratio setting means, wherein, when the correction instructing information that gives an instruction to correct the adding ratio is inputted via the adding ratio inputting means, the adding ratio setting means corrects the adding ratio in accordance with the inputted information.
The image processing apparatus according to the fourth aspect of the present invention further includes the outputting means for outputting an image based on image data for output. For example, a recording material, a CRT, or the like is used as the outputting means for outputting a soft-focus image. Further, the image processing apparatus also includes the adding ratio inputting means for inputting information that gives an instruction to correct the adding ratio for the time when soft-finished image data and original image data are combined with each other. For example, a keyboard, a mouse, and/or the like are used as the adding ratio inputting means, which allows input of information that gives an instruction to correct the adding ratio when operated by an operator.
In the image processing apparatus with the above configuration, an operator may become aware that correction of the soft-focus intensity is required when he or see sees the soft-focus image outputted by the outputting means. For example, such a situation occurs when a face of a person in the soft-focus image can not be discerned. In this case, the operator inputs information that gives an instruction to correct the adding ratio by the adding ratio inputting means. Accordingly, on the basis of the information that has been inputted, the adding ratio setting means calculates again and corrects the adding ratio for the time when soft-finished image data and original image data are combined with each other. As a result, a soft-focus image having desired soft-focus intensity can be formed.
In a fifth aspect of the present invention, in the image processing apparatus of the second or third aspect, the outputting means is a monitor for displaying the image based on the image data for output, and an image that has been corrected in accordance with the correction instructing information inputted by the adding ratio inputting means or information representing a changed degree of soft-finish that has been changed by the soft-finish-degree changing means is successively displayed on the monitor.
According to the invention of the fifth aspect, since the image that has been corrected in accordance with the correction instructing information or the representing a changed degree of soft-finish is successively displayed on the monitor, the corrected image can be confirmed in real time, thereby enabling to obtain an adequate soft-focus image.
In a sixth aspect of the present invention, in the image processing apparatus of the fifth aspect, the adding ratio inputting means substantially specifies a size of a face of a person in the image displayed on the monitor so that an adding ratio or a degree of soft-finish of the soft-finished image data that is appropriate for the substantially specified face size is set.
According to the invention of the sixth aspect, in most of the cases, soft-focus intensity depends on the size of the face of the person photographed in an image. Since setting can be conducted while checking visually the size of the face on the monitor, precision in extracting the face becomes high. Higher precision in extracting the face can results in an adequate adding ratio of a soft-finished image. It should be noted that occurrence of erroneous extraction can be made less frequent, compared with the case where face extraction is conducted automatically.
In a seventh aspect of the present invention, in the image processing apparatus of the fifth or sixth aspect, an image is displayed on the monitor on the basis of low resolution image data that is prepared from the image data for output, and at least one of the adding ratio and the degree of soft-finish of the soft-finished image data is reset in such a manner that a result of display of the image based on the low resolution data is equivalent to a degree of soft-focus of an image that is actually outputted.
According to the invention of the seventh aspect, when an image is displayed on the monitor, low resolution data is used for monitor display so as to shorten display access time and reduce a memory amount, because it requires time before the image is displayed and require a vast amount of memory if high resolution data is used. At the same time, since the degree of soft-finish of what is displayed by the low resolution data is made coincide with that of the image that is actually outputted, for example, difference between them will no longer be felt at the time of printing.
It should be noted that in the seventh aspect, low resolution data for monitor display may be newly prepared. However, pre-scan data can be used for monitor display if, in reading the image, an image reading apparatus is applied wherein pre-scan is firstly carried out at relatively low resolution so as to see the condition of the image, and light amount for reading is then adjusted in accordance with the pre-scan so that fine scan is carried out at relatively high resolution.
According to an eighth aspect of the present invention, the image processing apparatus of the sixth aspect comprises: soft-finished image data generating means for generating soft-finished image data representing a soft-finished image in which sharpness of an original image represented by the original image data is reduced in accordance with a degree of soft-finish that is set in advance, on the basis of original image data; soft-finish-degree setting means for setting, with respect to the original image, a degree of soft-finish of the soft-finished image represented by the soft-finished image data, which is generated by the soft-finished image data generating means; and image data combining means for combining the soft-finished image data that is generated by the soft-finished image data generating means with the original image data so as to generate image data for output.
The image processing apparatus according to the eighth aspect of the present invention includes the soft-finished image data generating means for generating soft-finished image data representing a soft-finished image, in which sharpness of an original image represented by original image data is reduced in accordance with a degree of soft-finish that is set in advance. The degree of soft-finish is a degree in which soft-finish of a soft-finished image represented by soft-finished image data is generated to an original image, and is set by the soft-finish-degree setting means. The soft-finish-degree setting means can set the degree of soft-finish on the basis of soft-focus intensity of a soft-focus image to be formed. For example, if higher soft-focus intensity is required, it can be realized by setting, with respect to an original image, high the degree of soft-finish of a soft-finished image represented by soft-finished image data. On the other hand, if lower soft-focus intensity is required, it can be realized by setting the degree of soft-finish low. Further, the image processing apparatus includes the image data combining means for combining soft-finished image data with original image data so as to generate image data for output, and a soft-focus image can be formed by outputting an image through the use of the image data for output that is generated by the image data combining means.
Accordingly, since the degree of soft-finish of the soft-finished image represented by soft-finished image data with respect to the original image can be set in accordance with desired soft-focus intensity, soft-focus intensity of a soft-focus image can be changed.
According to a ninth aspect of the present invention, the image processing apparatus of the eighth aspect further comprises: face region extracting means for on the basis of the original image data, extracting a region which corresponds to a face of a person in the original image; and determining means for determining the size of the region which corresponds to the face and is extracted by the face region extracting means, wherein, on the basis of the size of the region corresponding to the face which size is determined by the determining means, the soft-finish-degree setting means sets , with respect to the original image, the degree of soft-finish of the soft-finished image represented by the soft-finished image data.
A face of a person in an original image may not be discerned when a region that corresponds to the face of the person is small but a soft-focus image is nevertheless formed with soft-focus intensity being set high. In other words, the face of the person may not be discerned in the soft-focus image that is formed with the degree of soft-finish being set high. Thus, according to the ninth aspect of the present invention, the soft-finish-degree setting means sets the degree of soft-finish on the basis of the size of the region that corresponds to the face of the person in the original image and is extracted by the face region extracting means, which is determined by the determining means. For example, when the extracted region that corresponds to the face of the person is small, the degree of soft-finish is set low so that soft-focus intensity is made lower. As a result, it is possible to discern the person reliably even in the soft-focus image that is formed when the region corresponding to the face of the person in the original image is small.
According to a tenth aspect of the present invention, the image processing apparatus of the eighth or ninth aspect further comprises: outputting means for outputting an image based on image data for output that is generated by the image data combining means; and soft-finish-degree inputting means for inputting information that gives an instruction to correct the degree of soft-finish which is set by the soft-finish-degree setting means, wherein, when the information that gives the instruction to correct the degree of soft-finish is inputted via the soft-finish-degree inputting means, the soft-finish-degree setting means corrects the degree of soft-finish in accordance with the inputted information.
According to the image processing apparatus of the tenth aspect of the present invention, an operator may determine that correction of soft-focus intensity is required when he or see sees the soft-focus image outputted by the outputting means. In this case, the operator inputs information that gives an instruction to correct a degree of soft-finish by the soft-finish-degree inputting means such as a keyboard and/or a mouse. When the information that gives the instruction to correct the degree of soft-finish is thus inputted, the soft-finish-degree setting means corrects the degree of soft-finish of the soft-finished image represented by soft-finished image data, with respect to the original image, on the basis of the information that has been inputted. As a result, a soft-focus image having desired soft-focus intensity can be formed.
In an eleventh aspect of the present invention, in the image processing apparatus of any one aspect of the aspects 1 through 9, the image data combining means forms soft-finished images of respective colors of R, G, and B of the original image, and carries out a combining operation on each of the respective soft-finished images of the respective colors of R, G, and B of the original image.
According to the invention of the eleventh aspect, since each color of R, G, and B of the original image presents a varying degree of conspicuousness to person""s eyes, a soft-finished image is generated and combined for each color. This method of generating a soft-finished image is conventional, which obviates the need to add other colors for obtaining a soft-focus image.
In a twelfth aspect of the present invention, in the image processing apparatus of any one aspect of the aspects 1 through 9, the image data combining means form a soft-finished image corresponding to a Y signal, and combines the soft-finished image corresponding to the Y signal with each of R, G, and B colors of the original image, respectively.
According to the invention of the twelfth aspect, by using the Y signal to which each color of R, G, and B of the original image is allocated, only one soft-finished image data is required, thereby simplifying the processing.
The following are the examples that may be used as the ratios of the respective colors of R, G, and B of the original image for generating the Y signal:
(1) Y=0.3R+0.6G+0.1B
(2) Y=0.33R+0.33G+0.33B